<?php
/**
 * $Id$
 * 
 * This file can not be redistributed to anyone without the permission of Giga Promoters
 * Copyright 2005 - 2008, Giga Promoters
 * 						  608 Aggarwal Cyber Plaza
 *						  Netaji Subhash Place, Delhi - 110034
 *						  www.gigapromoters.com
 * 
 *
 * @version 			$Rev$
 * @lastModifiedBy		$LastChangedBy$
 * @lastChanged			$Date$
 * @copyright 			Giga Promoters (www.gigapromoters.com)
 * 
 */

/**
 * Init hooks checks if config file is present, if no, run installation.
 *
 * @param unknown_type $controller
 */
function ConfigInitHook(&$controller)
{
    
}

function ConfigBuildAdminMenuHook($backend)
{
	$backend->addMenuItem(ADMIN_SETTINGS, __('Database settings'), array('controller'=>"database_config",'action'=>"setting",'plugin'=>"config"));
	
	/*
	require_once(CONFIG_VENDORS_PATH.'giga_config.php');
	$gigaConfig = new GigaConfig();
	callHooks('DefineConfig', '.+', $gigaConfig);
	//prd($gigaConfig);
	foreach($gigaConfig->getGroups() as $group)
	{
		if(!$group['hidden'])
		{
			$backend->addMenuItem('Configuration',$group['title'], '/config/updateSettings/'.$group['name']);
		}
	}
	Configure::write('gigaConfig', $gigaConfig);
	*/
}

function ConfigSetIntallerStepsHook($controller)
{
	$step = new InstallerStep(array("model"=>"Config.DatabaseConfig","fieldGroup"=>"setup",'validateFirst'=> true,'title'=>"DB Config"));
	Installer::addStep($step,"db_config",3);
}
?>